Programming with Polymorphic Variants
نویسنده
چکیده
Type inference for structural polymorphism —i.e. record and variant polymorphism— has been an active area of research since more than 10 years ago, and many results have been obtained. However these results are yet to be applied to real programming languages. Based on our experience with the Objective Label system, we describe how variant polymorphism can be integrated in a programming language, and what are the benefits. We give a detailed account of our type inference and compilation schemes.
منابع مشابه
Typing deep pattern-matching in presence of polymorphic variants
Polymorphic variants are a well-known feature of the Objective Caml programming language, and they have turned popular since their introduction. They allow structural equality of algebraic type definitions, and code reuse through their polymorphism. Their typing and compilation have been studied in the past, and there are already detailed published works for both2),4). By their very nature, pol...
متن کاملA Mathematical Programming for a Special Case of 2E-LRP in Cash-In-Transit Sector Having Rich Variants
In this article, we propose a special case of two-echelon location-routing problem (2E-LRP) in cash-in-transit (CIT) sector. To tackle this realistic problem and to make the model applicable, a rich LRP considering several existing real-life variants and characteristics named BO-2E-PCLRPSD-TW including different objective functions, multiple echelons, multiple periods, capacitated vehicles, dis...
متن کاملFaithful Ideal Models for Recursive Polymorphic Types
We explore ideal models for a programming language with recursive polymorphic types, variants of the model studied by MacQueen, Plotkin, and Sethi. The use of suitable ideals yields a close t between models and programming language. Two of our semantics of type expressions are faithful, in the sense that programs that behave identically in all contexts have exactly the same types.
متن کاملFine-grained Information Flow Analysis for a λ-calculus with Sum Types (Full version)
This paper presents a new type system tracing information flow for a λ-calculus equipped with polymorphic “let” and with sums (a.k.a. union types or polymorphic variants). The type system allows establishing (weak) noninterference properties. Thanks to original forms of security annotations and constraints, it is more accurate than existing analyses. Through a straightforward encoding into sums...
متن کاملFine-grained Information Flow Analysis for a -calculus with Sum Types
This paper presents a new type system tracing information flow for a -calculus equipped with polymorphic “let” and with sums (a.k.a. union types or polymorphic variants). The type system allows establishing (weak) noninterference properties. Thanks to original forms of security annotations and constraints, it is more accurate than existing analyses. Through a straightforward encoding into sums,...
متن کاملExploring the Effects of Gap-Penalties in Sequence-Alignment Approach to Polymorphic Virus Detection
Antiviral software systems (AVSs) have problems in identifying polymorphic variants of viruses without explicit signatures for such variants. Alignment-based techniques from bioinformatics may provide a novel way to generate signatures from consensuses found in polymorphic variant code. We demonstrate how multiple sequence alignment supplemented with gap penalties leads to viral code signatures...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998